package com.leon.alishop.core.bo;

import java.util.ArrayList;
import java.util.List;

import com.leon.alishop.core.enumeration.CityAreaTypeEnum;
import com.leon.alishop.model.CityArea;

public class CityAreaBo extends CityArea implements Cloneable{

	private List<CityAreaBo> childCityAreaBos;

	public boolean addChildCityArea(CityAreaBo childCityAreaBo) {
		if(null == childCityAreaBos)
			childCityAreaBos = new ArrayList<CityAreaBo>();
		return childCityAreaBos.add(childCityAreaBo);
	}
	
	public List<CityAreaBo> getChildCityAreaBos() {
		return childCityAreaBos;
	}

	public void setChildCityAreaBos(List<CityAreaBo> childCityAreaBos) {
		this.childCityAreaBos = childCityAreaBos;
	}
	
	public CityAreaTypeEnum getCityAreaType(){
		return CityAreaTypeEnum.valueOfOrder(super.getLevel());
	}
	
}
